<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
  <head>
  
<!-- RapidValidation 表单验证框架开始 -->
<style type="text/css">
/** 修改验证框架提示文字位置和颜色为同行显示, 字体为蓝色 */
	.validation-advice {
		display:inline;
		/* color: blue; */
	}
</style>

<script src="rapid_validation/prototype_for_validation.js" type="text/javascript"></script>
<script src="rapid_validation/validation_cn.js" type="text/javascript"></script>
<script src="rapid_validation/effects.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="rapid_validation/style_min.css" />
<!-- RapidValidation  表单验证框架结束 -->
  
<style>
.errorMessage {color:red;}
.errorLabel {font-weight:bold}
</style>  
    <title>QuickValidation前后台统一验证演示页面</title>
  </head>
  <body>
<h2>QuickValidation前后台统一验证演示页面</h2>
前台验证的更多信息请访问开源框架: http://code.google.com/p/rapid-validation/<br>
提示:测试后台验证规则请禁用浏览器脚本功能!<br>
普通表单和出错信息提示:<br>
<span class="errorMessage">
${validationErrors}
</span>

<form action="form_js.action" method=post class='required-validate'>
   用户名(user.name): <input name=user.name value="${param['user.name']}" class="required min-length-5 max-length-10 validate-alpha"><br>
   年龄(age): <input name=age value="${param.age}" class="validate-digits min-value-18 max-value-100"><br>
   密码: <input name=password class="required"><br>
   密码重复: <input name=password2 class="required equals-password"><br>
   邮件: <input name=email value="${param.email}" class="validate-email"><br>
   性别: <input type=checkbox name=gender value="1" class="validate-one-required">男 <input type=checkbox name=gender value="0" class="validate-one-required">女<br>
   IP地址: <input name=ip value="${param.ip}" class="validate-ip"><br>
   数字1: <input name=num1 value="${param.num1}" class="validate-number"> 数字2(小于数字1): <input name=num2 value="${param.num2}" class="validate-number less-than-num1"> <br>
   生日:<input name=date value="${param.date}" class="validate-date"><br>
   浮点数字范围(1~10):<input name=float value="${para['float']}" class="float-range-1-10"><br>
   住址: <input name=address value="${param.address}" class="validate-chinese"><br>
   邮编: <input name=zip value="${param.zip}" class="validate-zip"><br>
   身份证: <input name=id_num value="${param.id_num}" class="validate-id"><br>
   <input type=submit value="提交">
</form>

  </body>
</html>